import request from '@/utils/request'

// 查询补卡申请列表
export function listReissue_apply(query) {
  return request({
    url: '/oa/reissue_apply/list',
    method: 'get',
    params: query
  })
}

// 查询补卡申请详细
export function getReissue_apply(applyId) {
  return request({
    url: '/oa/reissue_apply/' + applyId,
    method: 'get'
  })
}

// 新增补卡申请
export function addReissue_apply(data) {
  return request({
    url: '/oa/reissue_apply',
    method: 'post',
    data: data
  })
}

// 修改补卡申请
export function updateReissue_apply(data) {
  return request({
    url: '/oa/reissue_apply',
    method: 'put',
    data: data
  })
}

// 删除补卡申请
export function delReissue_apply(applyId) {
  return request({
    url: '/oa/reissue_apply/' + applyId,
    method: 'delete'
  })
}

// 发送邮件
export function sendEmail(data) {
  return request({
    url: '/oa/reissue_apply/sendEmail',
    method: 'post',
    data: data
  })
}

// 查询：我需要审批的请假列表
export function listApproval() {
  return request({
    url: '/oa/reissue_apply/approval/list',  // 对应后端 @GetMapping("/approval/list")
    method: 'get'
  })
}

// 查询：抄送给我的请假列表
export function listCopied() {
  return request({
    url: '/oa/reissue_apply/copied/list',    // 对应后端 @GetMapping("/copied/list")
    method: 'get'
  })
}
